package com.taobao.txc.resourcemanager.mt;

import com.taobao.txc.common.LoggerInit;
import com.taobao.txc.common.LoggerWrap;
import com.taobao.txc.common.a;
import com.taobao.txc.common.b.b;
import com.taobao.txc.common.config.o;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.StringReader;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.ThreadPoolExecutor;

public class c
  extends com.taobao.txc.resourcemanager.c
{
  private static final LoggerWrap g = LoggerInit.logger;
  private static c h;
  
  public c(ThreadPoolExecutor paramThreadPoolExecutor)
  {
    super(paramThreadPoolExecutor);
  }
  
  public static c b(ThreadPoolExecutor paramThreadPoolExecutor)
  {
    if (h == null) {
      h = new c(paramThreadPoolExecutor);
    }
    return h;
  }
  
  public void b()
  {
    g.info("MtRmRpcClient init");
    super.b();
  }
  
  public short d()
  {
    return (short)a.b.a();
  }
  
  protected void c()
  {
    if (this.a == null) {
      synchronized (this)
      {
        if (this.a == null) {
          try
          {
            String str1 = o.a().a("com.taobao.txc.mtjournel." + l(), "TXC_MT_JOURNEL", 5000L);
            this.a = new HashSet();
            if (str1 != null)
            {
              localObject1 = new BufferedReader(new StringReader(str1));
              String str2;
              while ((str2 = ((BufferedReader)localObject1).readLine()) != null)
              {
                g.info(String.format("add a server of mt [%s]", new Object[] { str2 }));
                this.a.add(str2);
              }
              Iterator localIterator = this.a.iterator();
              while (localIterator.hasNext())
              {
                String str3 = (String)localIterator.next();
                a(str3);
              }
            }
          }
          catch (IOException localIOException)
          {
            Object localObject1 = b.a;
            g.a(((b)localObject1).bd, ((b)localObject1).be, localIOException);
          }
        }
      }
    }
  }
}


/* Location:           C:\Users\ibm\Downloads\txc-yun-sample (1)\txc-yun-sample\lib\txc-client-2.0.72.jar
 * Qualified Name:     com.taobao.txc.resourcemanager.mt.c
 * JD-Core Version:    0.7.0.1
 */